Telegram Group & Telegram Channel
35. Number pattern 10.


1
121
12321
1234321
123454321
12345654321
1234567654321


import java.util.*;

class Pattern
{
public static void main(String[] args)
{
int i, j, k = 1, l, n;
Scanner sc = new Scanner(System.in);

System.out.println("Enter the number of levels of pattern");
n = sc.nextInt();

System.out.println("\nPattern is : \n");

for (i = 1; i <= n; i++)
{
l = i;

for (j = 1; j <= k; j++)
{
if (j >= i + 1)
{
System.out.print(--l);
}

else
{
System.out.print(j);
}
}

k = k + 2;
System.out.println(" ");
}
}
}

@java_codings



tg-me.com/java_codings/47
Create:
Last Update:

35. Number pattern 10.


1
121
12321
1234321
123454321
12345654321
1234567654321


import java.util.*;

class Pattern
{
public static void main(String[] args)
{
int i, j, k = 1, l, n;
Scanner sc = new Scanner(System.in);

System.out.println("Enter the number of levels of pattern");
n = sc.nextInt();

System.out.println("\nPattern is : \n");

for (i = 1; i <= n; i++)
{
l = i;

for (j = 1; j <= k; j++)
{
if (j >= i + 1)
{
System.out.print(--l);
}

else
{
System.out.print(j);
}
}

k = k + 2;
System.out.println(" ");
}
}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_codings/47

View MORE
Open in Telegram


Advance Java ‍ Telegram | DID YOU KNOW?

Date: |

To pay the bills, Mr. Durov is issuing investors $1 billion to $1.5 billion of company debt, with the promise of discounted equity if the company eventually goes public, the people briefed on the plans said. He has also announced plans to start selling ads in public Telegram channels as soon as later this year, as well as offering other premium services for businesses and users.

Find Channels On Telegram?

Telegram is an aspiring new messaging app that’s taking the world by storm. The app is free, fast, and claims to be one of the safest messengers around. It allows people to connect easily, without any boundaries.You can use channels on Telegram, which are similar to Facebook pages. If you’re wondering how to find channels on Telegram, you’re in the right place. Keep reading and you’ll find out how. Also, you’ll learn more about channels, creating channels yourself, and the difference between private and public Telegram channels.

Advance Java ‍ from in


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM USA